<?php
/**
 * @project kkzc
 * @date 2015-7-24
 * @author xialei <xialeistudio@gmail.com>
 */

namespace app\components;


class Response extends \yii\web\Response
{
    protected function sendHeaders()
    {
        $headers = $this->getHeaders();
        //CORS SETTING
        $headers
            ->setDefault('Access-Control-Allow-Origin', '*')
            ->setDefault('Access-Control-Allow-Methods', '*')
            ->setDefault('Access-Control-Request-Headers', '*');
        parent::sendHeaders();
    }

}